//#;fixCase;asynchronous;datacontract;clientProxy
////#TreatObsoleteAsError

//option deprecated=true;

syntax = "proto2";
package foo.bar;

import "descriptor.proto";

extend google.protobuf.MessageOptions {
  optional string my_option = 51234;
}

message MyMessage {
  option (my_option) = "Hello world!";
}

/*
message news
{
    required string name = 1;

    oneof test_oneof1
    {
        string text1 = 100;
        bytes data1 = 101;
    }

    oneof test_oneof2
    {
        string text2 = 200;
        bytes data2 = 201;
    }
}
*/

message FooOptions {
  optional int32 opt1 = 1;
  optional string opt2 = 2;
}

extend google.protobuf.FieldOptions {
  optional FooOptions foo_options = 1234;
}

// usage:
message Bar {
  optional int32 a = 1 [(foo_options).opt1 = 123, (foo_options).opt2 = "baz"];
  // alternative aggregate syntax (uses TextFormat):
  optional int32 b = 2 [(foo_options) = { opt1: 123 opt2: "baz" }];
}

message Foo {
  extensions 100 to 199;
}

extend Foo {
  optional int32 bar = 126;
}

message simpleMessage1
{
    required int32 i1_int32_test = 1 [deprecated=true];
    optional int32 i2 = 2;
    optional string s1_string = 12;
    repeated int32 i3_3d = 3;
    optional simpleEnum type = 44 [default=zwei];
    optional simpleEnum type2 = 45 [default=zwei];
    optional verySimple msg = 33;
    repeated verySimple list = 34;
}

message verySimple
{
    option message_set_wire_format = true;
    option deprecated = true;
}

message inMsg1
{
  enum Corpus
   {
    UNIVERSAL = 0;
    WEB = 1;
    IMAGES = 2;
    LOCAL = 3;
    NEWS = 4;
    PRODUCTS = 5;
    VIDEO = 6;
  }
  optional Corpus corpus = 4 [default = UNIVERSAL];

  optional outMsg2 msg2 = 1;
  optional outMsg1 msg1 = 2;

  message outMsg1 {}
}

message outMsg2
{}

enum simpleEnum
{
    option deprecated = true;
    eins = 1;
    zwei = 2;
    drei = 3 [deprecated=true];
}

service simpleService3
{
    option deprecated = true;
    rpc s21 (inMsg1) returns (outMsg2);
    rpc s211 (simpleMessage1) returns (simpleMessage1);
}

service simpleService4
{
    rpc s22 (simpleMessage1) returns (simpleMessage1);
}

service service1
{
    rpc serv1 (test1) returns (test2);
    rpc serv2 (test2) returns (test1);
}

message test3
{
    required test10.test11 test = 1 [deprecated=true];
    extensions 12300 to 12399;
}

extend test3
{
    optional string testex = 12345;
}

message test2
{
    repeated int32 field1 = 33;
    repeated int32 field2 = 3 [packed=true];
}

message test10
{
    optional int32 field1 = 10;
    required string field2 = 22;
    repeated string fields = 33;

    message test11
    {}

    enum enum11
    {
    test1 = 1;
    test2 = 2;
    }
}

message allTypes
{
    optional double doublef = 1;
    optional float floatf = 2;
    optional int64 int64f = 3;
    optional uint64 uint64f = 4;
    optional int32 int32f = 5;
    optional fixed64 fixed64f = 6;
    optional fixed32 fixed32f = 7;
    optional bool boolf = 8;
    optional string stringf = 9;
    optional bytes bytesf = 10;
    optional uint32 uint32f = 11;
    optional sfixed32 sfixed32f = 12;
    optional sfixed64 sfixed64f = 13;
    optional sint32 sint32f = 14;
    optional sint64 sint64f = 15;
    optional testenum1 enumf = 16 [default = enum2];
    optional test1 messagef = 17;

    optional bool boolf2 = 28 [default=true];
    optional int32 int32f2 = 25 [default =123];
    optional string stringf2 = 29 [default="lkjlkj"];
    optional bytes bytesf2 = 20 [default="1,2,3"];
    optional testenum1 enumf2 = 26 [default = enum1];
}

message test1
{}

enum testenum1
{
 enum1 = 1;
 enum2 = 12 [deprecated=true];
}

enum testenum2
{
 option allow_alias = true;
 enum3 = 1;
 enum4 = 12;
 enum5 = 12;
}